﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Common;
using ZBJF.Warranty.Common.Enums.Data;
using ZBJF.Warranty.Common.Enums.InsuranceOrder;

namespace ZBJF.Warranty.Model.ViewModel.InsuranceWarranty
{
  public  class GetSellerInsuranceProductsModel
    {
        /// <summary>
        /// 
        /// </summary>
        public long  ID { set; get; }
        /// <summary>
        /// 
        /// </summary>
        public string ProductName { set; get; }
      /// <summary>
      /// 
      /// </summary>
      public long InsuranceDeviceType { set; get; }

      public string InsuranceDeviceTypeDesc
      {
          get { return EnumHelper.Instance.GetDescription(typeof(InsuranceOrderDeviceType), InsuranceDeviceType); }

      }

      public long SellerInsuranceProductId { set; get; }
      public long InsuranceProductId { set; get; }
      public decimal EquipmentPrice { set; get; }
      /// <summary>
      /// 
      /// </summary>
      public long InsuranceDevice { set; get; }
      /// <summary>
      /// 
      /// </summary>
      public long InsuranceProductCategory { set; get; }

      public string InsuranceProductCategoryDesc
      {
          get { return EnumHelper.Instance.GetDescription(typeof(InsuranceProductCategory), InsuranceProductCategory); }
      }
      /// <summary>
      /// 
      /// </summary>
      public long ParentId{ set; get; }
      /// <summary>
      /// 
      /// </summary>
      public string CompanyName{ set; get; }
      /// <summary>
      /// 
      /// </summary>
      public long InsuranceCompanyId { set; get; }
      //public string CompanyName
      //{
      //    get { _companyname ?? ""; }
      //    set {_companyname=value}
      //}
      /// <summary>
      /// 
      /// </summary>
      public string ParentCompanyName{ set; get; }
      // public string ParentCompanyName
      //{
      //    get { _parentcompanyname ?? ""; }
      //    set {_parentcompanyname=value}
      //}
      /// <summary>
      /// 
      /// </summary>
      public string CompanyNameDesc
      {
          get
          {
              return CompanyName != "" ? ParentCompanyName + "-" + CompanyName : "";
          }
      }
      public decimal Coverage { set; get; }
      public string SellersName { set; get; }
      public int PolicyPeriod { set; get; }
      public int PolicyPeriodUnit { set; get; }

      public string PolicyPeriodDesc
      {
          get { return PolicyPeriod + EnumHelper.Instance.GetDescription(typeof(InsuranceOrderPeriodUnit), PolicyPeriodUnit); }
      }
    }
}
